package com.learn.scrm;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.UUID;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.Date;

/**
 * @author : Yu.Tan
 * @date : 2023/5/25 10:26
 * @desc : **
 */
public class JsonTest {

    public static void main(String[] args) {
        JSONObject smartJson = JSON.parseObject("{\"autohome\":\"18668475507\"}");

        String yiche = smartJson.getOrDefault("yiche","").toString();

        System.out.println(yiche.equals(null));

        Date toJdkDate = DateUtil.parse("1970-01-01 00:00:00").toJdkDate();
        System.out.println(toJdkDate.toString());

        Integer a=new Integer(1999);
        System.out.println(a==null);


        JSON json = JSON.parseObject(JSON.toJSONString(new Object()), JSON.class);
        System.out.println(json);

        String string = UUID.randomUUID().toString();
        System.out.println(string);
    }
}
